package sketch.ounit;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

public class ValuesTest extends TestCase {
	public static Test suite() {
        return new TestSuite(ValuesTest.class);
    }
	
	public void testValueMethods() {
		boolean existing_value = Values.throw_exception;
		Values.throw_exception = true;
		try {
			Values.choose(1, 2, 3, 4);
			fail();
		} catch (UnsupportedOperationException ex) {
			//ok
		}
		
		try {
			Values.exhaust(1, 2, 3, 4);
			fail();
		} catch (UnsupportedOperationException ex) {
			//ok
		}
		
		try {
			Values.randomChoose(1, 2, 3, 4);
			fail();
		} catch (UnsupportedOperationException ex) {
			//ok
		}
		Values.throw_exception = existing_value;
	}
}